package com.free.system.api;

import com.free.common.core.constant.ServiceNameConstants;
import com.free.common.core.web.domain.R;
import com.free.common.core.web.page.TableDataInfo;
import com.free.system.api.domain.ZoneNote;
import com.free.system.api.factory.RemoteNoteFallbackFactory;
import com.free.system.api.domain.ZoneNote;
import com.free.system.api.factory.RemoteNoteFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 用户服务
 *
 * @author free
 */
@FeignClient(contextId = "remoteNoteService", value = ServiceNameConstants.FREE_NOTE, fallbackFactory = RemoteNoteFallbackFactory.class)
public interface RemoteNoteService {
    /**
     * 获取一个需要识别的记录
     *
     * @param
     */
    @GetMapping("/note/getNeedRecognitionOne")
    public R<ZoneNote> getNeedRecognitionOne();
    /**
     * 获取一个需要文件同步的
     *
     * @param
     */
    @GetMapping("/note/getNeedFileSynchronization")
    public R<ZoneNote> getNeedFileSynchronization();

    /**
     * 获取一个需要识别的记录
     *
     * @param
     */
    @PostMapping("/note/getRandomOneByClassify")
    public R<ZoneNote> getRandomOneByClassify(@RequestBody String classify);

    /**
     * 更新记录
     *
     * @param
     */
    @PutMapping("/note")
    public R edit(@RequestBody ZoneNote zoneNote);

    /**
     * 获取一个笔记
     *
     * @param
     */
    @GetMapping("/note/randomOne")
    public R randomOne();
    /**
     * 获取一个笔记
     *
     * @param
     */
    @PostMapping("/note/listInner")
    public List<ZoneNote> listInner(@RequestBody ZoneNote zoneNote) ;

}
